// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]

// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command

use crate::svd::calculate;

mod svd;

#[tauri::command]
fn get24(mut name: Vec<i32>) -> Vec<String> {
    let target;
     match name.pop(){
         None => {return vec![String::from("请填写目标值")]}
         Some(x) => {target=x}
     };
    calculate::start_24(name,target)
}



fn main() {
    tauri::Builder::default()
        .invoke_handler(tauri::generate_handler![get24])
        .run(tauri::generate_context!())
        .expect("error while running tauri application");
}
